package com.xiaomo.gitee.datamanager.mapper;
import java.util.List;

import com.xiaomo.gitee.datamanager.cache.MybatisRedisCache;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;

import com.xiaomo.gitee.datamanager.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

@Mapper
@CacheNamespace(implementation = MybatisRedisCache.class,eviction = MybatisRedisCache.class)
public interface UserMapper extends BaseMapper<User> {
    List<User> selectPasswordByUsername(@Param("username") String username);

    User selectOneByUsername(@Param("username") String username);

    User selectOneById(@Param("id") Long id);

    int deleteByUsername(@Param("username") String username);

    @Override
    int insert(User entity);
}




